var nf = sm("do_Notification");
var rootview = ui("$");
var alayoutImg=ui("alayoutImg");
var label_percent=ui("label_percent");
var labelRemark=ui("labelRemark");
var common = require("common");
var openHelper = require("helper/open");
rootview.setMapping({
	"labelRemark.tag" : "id",
	"labelRemark.text" : "remark",
	"imageView.source":"pathImg",
	"alayoutImg.tag":"bigPathImg",
	"label_percent.tag":"percent",
	"alayoutImg.visible":"isShowImg",
});

//点击投票模板
ui("do_AlayoutRoot").on("touch", function(data, e) {
		common.open("source://view/vote/member/list.ui",{voteItemId:ui("labelRemark").tag});
});

rootview.on("dataRefreshed", function(){
	label_percent.text=label_percent.tag+"票";
})
// 图片浏览注册事件
alayoutImg.on("touch", function(data) {
	var jsonImgs=[];
	jsonImgs.push({source:alayoutImg.tag});
	openHelper.open("source://view/reuse/imgBrowser.ui", {
		imgDatas :JSON.stringify(jsonImgs),index:0
	});
})
